﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ebookstore
{
    public partial class RegisterUser : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //Show the Registration View
            MultiView1.SetActiveView(registrationView);
        }

        //Show inserted User Details
        protected void registerButton_Click(object sender, EventArgs e)
        {
            if (acceptTermsCheckBox.Checked)
            {
                if (passwordTextBox.Text == confirmPasswordTextBox.Text)
                {
                    firstnameLabel.Text = firstnameTextBox.Text;
                    lastnameLabel.Text = lastnameTextBox.Text;
                    emailLabel.Text = emailTextBox.Text;
                    addressLabel.Text = addressTextBox.Text;
                    telephoneLabel.Text = telephoneTextBox.Text;
                    zipCodeLabel.Text = zipCodeTextBox.Text;
                    cityLabel.Text = cityTextBox.Text;
                    countryLabel.Text = countryDropDownList.SelectedItem.ToString();
                    genderLabel.Text = genderRadioButtonList.SelectedItem.ToString();
                    MultiView1.SetActiveView(confirmRegistrationView);
                }
            }
            else
                acceptTermsInfoLabel.Text = "Accept the terms!";

        }
    }
}